/**
 * Multiworker 2000
 * @brief Tela principal
 * @author André Luiz de Oliveira Vasconcelos
 * @file mainwindow.h
 * @date 2011
 */

#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QSqlDatabase>
#include <QtDebug>
#include <QSplashScreen>
#include <QStandardItemModel>
#include <QListView>
#include <QIcon>
#include <QPushButton>
#include <QPoint>

#include "config.h"

namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    void setDb(QSqlDatabase);
    Config config;

private:
    Ui::MainWindow *ui;
    QSqlDatabase db;
    QStandardItemModel* itensDesktop;

    QAction * abrirItemAction;
    QAction * renomearItemAction;
    QAction * alterarPropriedadesItemAction;

private slots:
    void criarActions();
    void atualizarDesktop();
    void executarItem(QModelIndex index);
    void exibirMenuItem(QModelIndex index);
    void criarMenus();

    // Slots para o menu de contexto dos ícones
    void abrirItem();
    void renomearItem();
    void alterarPropriedadesItem();
};

#endif // MAINWINDOW_H
